package com.example.big_event.pojo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

import java.time.LocalDateTime;

@Data
/*编译阶段自动生成getter setter toString */
public class User {

    @NotNull
    private Integer id ;//id
    private String username;//用户名

    @JsonIgnore//把当前对象的password属性忽略，最终转换成json字符串时就没有password属性
    private String password;//密码

    @NotEmpty
    @Pattern(regexp = "^\\S{1,10}$")
    private String nickname;//昵称

    @NotEmpty
    @Email
    private String email;//邮箱
    private String uer_Pic;//头像
    private LocalDateTime createTime;//创建时间
    private LocalDateTime updateTime;//修改时间

}
